<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@page import="java.util.Date"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<link type="text/css" rel="stylesheet" href="../zxy/css/emp_info/emp_basic.css">
	<div class="zxy_eb_content">
		<div class="zxy_eb_view_content">
			<table class="zxy_eb_table">
				<tbody>
					<tr>
						<td><span class="zxy_eb_table_title">员工编号</span></td>
						<td><span class="zxy_eb_table_item" id="zxy_pc_emp_id">${emp.empId }</span></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">员工姓名</span></td>
						<td><span class="zxy_eb_table_item">${emp.empName }</span></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">英文姓名</span></td>
						<td><span class="zxy_eb_table_item">${emp.englishName }</span></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">部门</span></td>
						<td><span class="zxy_eb_table_item">${emp.dep.depName }</span></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">职务</span></td>
						<td><span class="zxy_eb_table_item">${emp.postSetting.postName }</span></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">制单人</span></td>
						<td><span class="zxy_eb_table_item">${emp.maker}</span></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">制单时间</span></td>
						<td><span id="zxy_pc_make_time" class="zxy_eb_table_item"></span></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">更新人</span></td>
						<td><span class="zxy_eb_table_item">${emp.updateEmp}</span></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">更新时间</span></td>
						<td><span id="zxy_pc_update_time" class="zxy_eb_table_item"></span></td>
					</tr>	
				</tbody>
			</table>
		</div>
	</div>
	
	<div class="zxy_eb_content">
		<div class="zxy_eb_view_content">
			<table class="zxy_eb_table">
				<tbody>
					<tr>
						<td><span class="zxy_eb_table_title">原部门</span></td>
						<td><span class="zxy_eb_table_item">${emp.dep.depName }</span></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">新部门</span></td>
						<td><input class="zxy_ebe_table_item easyui-combobox" 
								id="zxy_pc_dep" data-options="editable:false"></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">原职称</span></td>
						<td><span class="zxy_eb_table_item">${emp.postSetting.postName }</span></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">新职称</span></td>
						<td><input class="zxy_ebe_table_item easyui-combobox" 
								id="zxy_pc_post" data-options="editable:false"></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">原职级</span></td>
						<td><span class="zxy_eb_table_item">${emp.rankSetting.rankName }</span></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">新职级</span></td>
						<td><input class="zxy_ebe_table_item easyui-combobox" 
								id="zxy_pc_rank" data-options="editable:false"></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">批准人</span></td>
						<td><input class="zxy_ebe_table_item easyui-combobox" 
								id="zxy_pc_approver"></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">批准部门</span></td>
						<td><input class="zxy_ebe_table_item easyui-textbox" 
								id="zxy_pc_approver_dep"></td>
					</tr>	
					<tr>
						<td><span class="zxy_eb_table_title">文件号</span></td>
						<td><input class="zxy_ebe_table_item easyui-textbox" 
								id="zxy_pc_doc_num"></td>
					</tr>
					<tr>
						<td><span class="zxy_eb_table_title">备注</span></td>
						<td><input class="zxy_ebe_table_item easyui-textbox" 
								id="zxy_pc_remark"></td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
	<script>
		var zxy_pc_emp='${empStr}';
		zxy_pc_emp=$.parseJSON(zxy_pc_emp);
		console.log(zxy_pc_emp);
		$("#zxy_pc_make_time").html(zxy_pc_emp.makeTime);
		$("#zxy_pc_update_time").html(zxy_pc_emp.updateTime);
		$("#zxy_pc_dep").combobox({
			url:'../dep/findAllDep',
			valueField:'depId',
			textField:'depName'
		});
		$("#zxy_pc_post").combobox({
			url:'../setting/findAllPostSetting',
			valueField:'postId',
			textField:'postName'
		});
		$("#zxy_pc_rank").combobox({
			url:'../setting/findAllRankSetting',
			valueField:'rankId',
			textField:'rankName'
		});
		$("#zxy_pc_approver").combobox({
			url:'../user/findAllUserBasic',
			valueField:'userId',
			textField:'userName',
			onSelect:function(record){
				console.log("record");
				console.log(record.depId);
				$("#zxy_pc_approver_dep").textbox('setText',record.depName);
			},
			/* onLoadSuccess:function(){
				console.log("depId");
				console.log($("#zxy_pc_approver").combobox('getData').depId);
			} */
		});
		$("#zxy_pc_approver_dep").textbox({
			valueField:'depId',
			textField:'depName',
			disabled:true
		})
	</script>
</body>
</html>